package com.tbit.uqbike.service.business.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tbit.uqbike.object.pojo.OrderHelmetLostLog;
import com.tbit.uqbike.object.pojo.vo.OrderHelmetLostLogQueryReqVO;
import com.tbit.common.entity.view.PageResult;
import com.tbit.uqbike.service.business.OrderHelmetLostLogService;
import com.tbit.uqbike.webmanager.dao.log.OrderHelmetLostLogDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author yao
 * @since 2025/2/28 10:05
 */
@Service
public class OrderHelmetLostLogServiceImpl implements OrderHelmetLostLogService {

    @Autowired
    private OrderHelmetLostLogDao orderHelmetLostLogDao;

    @Override
    public PageResult<OrderHelmetLostLog> getPage(OrderHelmetLostLogQueryReqVO reqVO) {
        Page<OrderHelmetLostLog> page = new Page<>(reqVO.getPageNO(), reqVO.getRowCount());
        page = orderHelmetLostLogDao.getPage(page, reqVO);
        return PageResult.convertPage(page);
    }

    @Override
    public List<OrderHelmetLostLog> getList() {
        return orderHelmetLostLogDao.selectList();
    }

    @Override
    public OrderHelmetLostLog getById(Integer id) {
        return orderHelmetLostLogDao.getById(id);
    }

    @Override
    public void create(OrderHelmetLostLog log) {
        orderHelmetLostLogDao.insert(log);
    }

    @Override
    public void update(OrderHelmetLostLog log) {
        orderHelmetLostLogDao.update(log);
    }

    @Override
    public void delete(Integer id) {
        orderHelmetLostLogDao.delete(id);
    }
}
